// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'

Vue.config.productionTip = false


//引入路由环境
// import Vue from "vue";
import VueRouter from "vue-router";
Vue.use(VueRouter);

//引入路由组件
import A from "./pages/A"
import B from "./pages/B"
import C from "./pages/C"

//创建路由
const routes = [
  {path:'/', redirect: '/C' },
  {path:"/A",component:A},
  {path:"/B",component:B},
  {path:"/C",component:C}
]

//创建路由器 注册路由
const router = new VueRouter({
  routes:routes
})

/* eslint-disable no-new */
//注册路由器
new Vue({
  el: '#app',
  components: { App },
  template: '<App/>',
  router:router
})
